﻿// <copyright file="User.cs" company="Ecole Normale Supérieure">
// Released under GPLv2
// </copyright>
// <summary>Contains the OpenId implementation of IUser</summary>

namespace Sqwarea.Persistence
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;

    /// <summary>
    /// OpenId implementation of IUser
    /// </summary>
    [DataContract]
    public class User : IExtensibleDataObject
    {
        /// <summary>
        /// Gets or sets user's id
        /// </summary>
        [DataMember]
        public long Id { get; set; }

        /// <summary>
        /// Gets or sets the OpenId url
        /// </summary>
        [DataMember]
        public string OpenId { get; set; }

        /// <summary>
        /// Gets or sets user's nickname
        /// </summary>
        [DataMember]
        public string Nickname { get; set; }

        /// <summary>
        /// Gets or sets user's language
        /// </summary>
        [DataMember]
        public string Language { get; set; }

        /// <summary>
        /// Gets or sets user's email
        /// </summary>
        [DataMember]
        public string Email { get; set; }

        /// <summary>
        /// Gets or sets user's last connection time
        /// </summary>
        [DataMember]
        public DateTime LastConnection { get; set; }

        /// <summary>
        /// Gets or sets user's remember keys
        /// </summary>
        [DataMember]
        public Dictionary<string, RemembranceSession> RemembranceSessions { get; set; }

        /// <summary>
        /// Gets or sets extension data
        /// </summary>
        public ExtensionDataObject ExtensionData { get; set; }
    }
}
